<?php

 /**
  * @package JooS
  * @subpackage Syntax
  */

  require_once "JooS/Syntax/Interface.php";

  require_once "JooS/Syntax/Compiler.php";
  
  abstract class JooS_Syntax_Abstract implements JooS_Syntax_Interface {
    /**
     * @var string
     */
    protected $_parsedValue = null;

    /**
     * @var JooS_Syntax_Compiler
     */
    private $_parser = null;

    public function  __construct() {
    }

    /**
     * @param JooS_Syntax_Compiler $parser
     * @return JooS_Syntax_Abstract
     */
    final public function setParser(JooS_Syntax_Compiler $parser) {
      $this->_parser = $parser;
      return $this;
    }

    /**
     * @return JooS_Syntax_Compiler
     */
    final public function getParser() {
      return $this->_parser;
    }

    /**
     * @return string
     */
    public function compileSyntax() {
      return $this->_parsedValue = $this->compile();
    }

    /**
     * @return string
     */
    public function getParsedValue() {
      return $this->_parsedValue;
    }
  }
